#include <stdio.h>
#include <stdlib.h>
#include <wordexp.h>
#include <string>

int main()
{
    wordexp_t p;
    char **w;
    std::string s = "ls \"1 s.txt\"";
    wordexp(s.c_str(), &p, 0);
    w = p.we_wordv;
    for (size_t i = 0; i < p.we_wordc; i++)
        printf("%s\n", w[i]);
    wordfree(&p);
    exit(EXIT_SUCCESS);
}
